package com.jhw.ymcc.feign;

import com.jhw.ymcc.fallback.CourseServiceFallbackFactory;
import com.jhw.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author jhw
 * @create 2022/10/15
 */
@FeignClient(contextId = "course", value = "service-course", fallbackFactory = CourseServiceFallbackFactory.class)
public interface CourseService {
    @RequestMapping(value = "/course/info/{courseIds}",method = RequestMethod.GET)
    JSONResult info(@PathVariable("courseIds") String courseIds);

    @RequestMapping(value = "/course/{id}",method = RequestMethod.GET)
    JSONResult get(@PathVariable("id")Long id);

}
